Vcert-java initial implementation#2
Conversation
Adds authorization functionality for Cloud and Onprem
* adds Read Zone Configuration functionality * adds Wiremock for testing
* Register an user venafi cloud * Add target to gitingnore
* Search cloud certificates * Optimize imports
|
Hi @tr1ck3r could you take a look at the current progress, we are progressing on the development, we can add any suggestion base on your input. |
* Certificate request pojo to be used for creating and retrieving certs * Implement connector generate certificate request * Generate CSR for RSA and ECDSA * Uncomment connector interface method and throw exceptions for yet to be implemented methods * Add integration tests to verify phase
* Feature/request certificate cloud (#4) * migrates request certificate method for cloud * adds tests for request certificate for cloud
|
You can remove register. It`s deprecated function. |
| assertThat(zoneConfiguration.province()).isNull(); | ||
| assertThat(zoneConfiguration.locality()).isNull(); | ||
| assertThat(zoneConfiguration.policy()).isNotNull(); | ||
| assertThat(zoneConfiguration.policy().subjectCNRegexes()).containsExactly(".*"); |
There was a problem hiding this comment.
i don't know how and what type of regular expressions dialect do you use, but remember, that regexp should match full string. so for example regexp .*\.example\.com should doesn't match cn www.example.company
There was a problem hiding this comment.
Hello I see, in this case, the test is validating that the API requires its correct from a stub external service https://github.com/opencredo/vcert-java-1/blob/68f1d07aaf4fc61e613361f68fb43b5932712cea/src/test/resources/mappings/cloud.certificatepolicies.di.json#L40
There was a problem hiding this comment.
I dont big specialist in java. I didt know what java pattern.matches which match whole string. In golang you need to add ^ and $ to your regexp for matching whole string.
|
Also please move hardcoded tokens and urls in tests to environment variables. |
* Retrieve certificate for cloud * Retrieve certificate for tpp
* migrates request certificate method for cloud * adds tests for request certificate for cloud * Feature/request certificate tpp (#5) * migrates request certificate method for tpp * adds test for request certificate for tpp
Not supported by cloud
Renew a cloud certificate
Bug/retrieve certificate
…tion Delete user registration
Done |
|
As I understand you just rewrite golang code to java. We are going to make some changes in the nearest future. May be you can just write better code from beginning and not copy our errors. |
|
Hello @M-Tron I fully understand we discuss this in our proposal, it will be good to have a more fluent API and refactor sections on our code, unfortunately, we are time constrained, so we implement as match parity as possible for tracking. We will try to implement part of the refactoring in this initial PR. |
Fix zone configuration not setting keytype
we have externalized acceptance test so it can be run by an integration environment and document the variables in the README file |
|
Can you also add example of library usages like https://github.com/Venafi/vcert/blob/master/example/main.go with
|
|
@mr-tron an Example class has been added this PR, The recommendation is to create a different project for examples, or submodule the project if more examples are required. |
Include additional examples (fix key and examples) (#26)
No description provided.